import os
from app.config.default import Config as DefaultConfig

_config = None


class MixedConfig(DefaultConfig):
    inited = False


def get_config():
    if MixedConfig.inited:
        return MixedConfig
    else:
        mode = os.environ.get('MODE')
        _override_config = {}

        try:
            MixedConfig.CONFIG_NAME = "default"
        except ImportError:
            exit(1)

        MixedConfig.inited = True

    return MixedConfig
